home *** CD-ROM | disk | FTP | other *** search
- ; $VER: AFind.install 1.00 (24.01.96)
- ; Script to install AFind
- ;
- (complete 0)
-
- ; Install script for AFind (Workbench 2.0 or higher)
-
- (set old_level @user-level)
-
- (set SourceDir "/")
- ;=============================================================================
- ; German strings
-
- (if (= @language "deutsch")
- (
- (set default_lang 2)
-
- (set #bad-kick "Sie benötigen Workbench 2.0 oder größer")
-
- (set #AFind-InstallMsg
- (cat "\n\AFind Installationsskript.\n"
- "Diese Skript installiert AFind auf Ihrem Amiga.\n\n"
- "Lesen Sie das Anleitungs-File für weitere Informationen\n"
- " über den Vertrieb von AFind.\n\n"
- "AFind © 1995-1996 Guido Mersmann\n"
- "All Rechte reserviert."
- ))
-
- (set #AFind-Where
- (cat "Wo möchten Sie AFind installieren ?\n"
- "(Ein Verzeichnis wird angelegt)"
- ))
-
- (set #AFind-Update
- (cat "\nEin AFind-Verzeichnis existiert im ausgewählen"
- " Verzeichnis. Wenn Sie fortfahren,"
- " bestätigen Sie, daß Sie die alte AFind-Installation"
- " mit der neuesten Version updaten wollen."
- " Verschiedene AFind-Dateien (z.B Prefs) werden falls nötig"
- " überschrieben!"
- ))
-
- (set #AFind-Main "Welche Version von AFind möchten Sie installieren?")
- (set #AFind-Main-help
- (cat "Die OS2.0+ Version läuft unter allen Systemen ab OS2.0."
- " Die OS2.1+ Version hat den Nutzen, daß sie weniger Resourcen"
- " benutzt, wenn sich AFind im Hintergrund befindet. Dazu MUß"
- " die Locale.library eingebunden sein. Für die OS3.0+ gilt das selbe"
- " wie für die OS2.1 Verison. Es werden OS3.0+ Routinen benutzt, die"
- " weiteren Speicher sparen."
- ))
-
- (set #AFind-copying-Main "\nKopiere AFind nach AFind/...")
- (set #AFind-copying-Catalogs "\nKopiere Kataloge nach ...AFind/Locale/...")
-
- (set #AFind-Language "\nWelche Sprachen sollen installiert werden ?")
- (set #AFind-Language-help
- (cat "\nDer Amiga kann in vielen verschiedenen Sprachen"
- " arbeiten. Um Plattenkapazität zu sparen können Sie"
- " nur die Sprachen anwählen, die sie benötigen"
- " Haken Sie also einfach die Sprachen ab, die Sie"
- " Ihrem System zugänglich machen wollen."
- ))
- (set #AFind-Docs "\nWelche Anleitungs- und Informationsdateien wollen Sie installieren ?")
-
- (set #AFind-Exit
- (cat "\nAFind installaliert !!\n\n"
- "Bitte reseten Sie ihren Rechner bevor Sie AFind"
- " das erste Mal benutzen. Dadurch werden Probleme mit den"
- " Sprachenkatalogen des Systems vermieden !!"
- ))
- ))
-
- ;=============================================================================
- ; English strings
-
- (if (<> @language "deutsch")
- (
- (set default_lang 4)
-
- (set #bad-kick "You must have at least Workbench 2.0+")
-
- (set #AFind-InstallMsg
- (cat "\n\AFind installation script.\n"
- "This script installs AFind on your Amiga.\n\n"
- "Read the DOK-file for more information\n"
- " on the distribution of AFind.\n\n"
- "AFind © 1995-1996 Guido Mersmann\n"
- "All rights reserved."
- ))
-
- (set #AFind-Where
- (cat "Where would you like to install AFind ?\n"
- "(A drawer will be created)"
- ))
-
- (set #AFind-Update
- (cat "\nA AFind drawer does already exist in the selected "
- " directory. By selecting \"Proceed\", you"
- " indicate that you want to update the AFind"
- " installation with the most recent version.\n"
- "Several AFind specific files will be overwritten!"
- ))
-
- (set #AFind-Main "Which AFind version should be installed ?")
- (set #AFind-Main-help
- (cat "The OS2.0+ version should only be used on Systems with OS2."
- " The OS2.1+ and the OS3.0+ version need less Memory. Locale is required!"
- " Special OS3.0+ functions are used to save more memory."
- ))
- (set #AFind-copying-Main "Copying AFind to ...AFind/...")
- (set #AFind_copying-Catalogs "Copying catalogs to ...AFind/Locale/...")
-
- (set #AFind-Language "\nWhich languages should be installed ?")
- (set #AFind-Language-help
- (cat "\nThe Amiga can be operated in many different"
- " languages."
- "To reduce the amount of space consumed by the"
- " language files, you can select to have only the"
- " files of specific languages copied.\n\n"
- "Simply check the boxes of the languages you wish"
- " to have available on your system.\n\n"
- ))
-
- (set #AFind-Docs "\nWhich text files should be installed in \"AFind:Docs\" ?")
-
- (set #AFind-Exit
- (cat "\nAFind installed !!\n\n"
- "Please reset your computer before starting AFind"
- ))
- ))
- ;=============================================================================
- (set #version (/ (getversion) 65536))
-
- (if (< #version 37)
- (
- (abort #bad-kick)
- )
- )
-
- (if (= #version 37) (set Binary 0))
- (if (= #version 38) (set Binary 1))
- (if (> #version 38) (set Binary 2))
-
-
- ;(set @default-dest "ram:")
- (set @default-dest "SYS:Tools/")
-
- (message #AFind-InstallMsg)
- (welcome)
-
- (set ProgDir
- (tackon
- (askdir
- (prompt #AFind-Where)
- (help @askdir-help)
- (default @default-dest)
- )
- "AFind"
- )
- )
-
- (if (= (exists ProgDir) 2)
- (message #AFind-Update)
- )
- ;*****
- ;***** Jetzt einige Pfade basteln ****
- ;*****
- (Set Catalogs (tackon Progdir "Catalogs"))
- (Set Docs (tackon Progdir "Docs"))
- (Set DocsDeutsch (tackon Progdir "Docs/Deutsch"))
- (Set DocsEnglish (tackon Progdir "Docs/english"))
- ;*****
- (
- (makedir ProgDir
- (help @makedir-help)
- (infos)
- )
- )
- (set @default-dest ProgDir)
-
- ;***** Create dirs
- (complete 20)
-
- (makedir Catalogs)
- (makedir Docs)
- (makedir DocsDeutsch)
- (makedir (tackon Progdir "Keyfile"))
-
- ;***** Delete old Data and Prefs
- (delete (tackon ProgDir "AFind"))
- ;***** Icons
- (complete 30)
-
- (copyfiles
- (source (tackon SourceDir "Docs.info"))
- (dest ProgDir)
- )
- (copyfiles
- (source (tackon SourceDir "AminetFind.info"))
- (dest ProgDir)
- )
- (copyfiles
- (source (tackon SourceDir "AddIndex"))
- (dest ProgDir)
- )
- (copyfiles
- (source (tackon SourceDir "AddIndexGUI"))
- (dest ProgDir)
- )
- (copyfiles
- (source (tackon SourceDir "AddIndexGUI.info"))
- (dest ProgDir)
- )
- ;**********************
- ;***** AFind_Main *****
- ;**********************
- (complete 40)
-
- (set Binary (askchoice
- (prompt #AFind-Main)
- (help #AFind-Main-help)
- (choices
- "OS2.0+"
- "OS2.1+"
- "OS3.0+"
- )
- (default Binary)
- )
- )
-
- (set Binary (Select Binary "AFind" "Bin/OS21" "Bin/OS30"))
- (copyfiles
- (prompt "\n" #AFind-copying-Main)
- (source (tackon SourceDir Binary) (infos))
- (dest ProgDir)
- (newname "AFind")
- (help @copyfiles-help)
- (optional <force>)
- )
- ;********************
- ;***** Catalogs *****
- ;********************
- (complete 50)
- (set lang (askoptions
- (prompt #AFind-Language)
- (help #AFind-Language-help)
- (choices
- "English"
- "Deutsch")
- (default -1)
- )
- )
- ;********************
- ;***** Copy Catalogs
- ;********************
- (set n 0)
- (while (< n 2)
- (set language (select n "english" "deutsch"))
- (
- (if (IN lang n)
- (
- (makedir (Tackon Catalogs language))
- (copyfiles
- (source (tackon (tackon SourceDir "Catalogs") language))
- (dest (tackon Catalogs language))
- (help @copyfiles-help)
- (all)
- )
- )
- )
- )
- (set n (+ n 1))
- )
-
- ;***** DOCS
- (complete 60)
- (set docs (askoptions
- (prompt #AFind-Docs)
- (help @askoptions-help)
- (choices
- "Guide"
- "ASCII"
-
- )
- (default 1)
- )
- )
-
- (set n 0)
- (while (< n 2)
- (set documents (select n "AFind.Guide" "AFind.Dok"))
- (
- (if (IN docs n)
- (
- (copyfiles
- (source (cat (tackon SourceDir "Docs/Deutsch/") documents))
- (dest (tackon ProgDir "Docs/Deutsch/"))
- (help @copyfiles-help)
- ; (infos)
- )
- )
- )
- )
- (set n (+ n 1))
- )
-
- (complete 70)
- (complete 80)
-
- ;**** WB_Startup ?
- (complete 90)
- ;(Set WBStartup (askbool
- ; (prompt #AFind-WBStartup)
- ; (help #AFind-Printer-help)
- ; (Default 1)
- ; )
- ;)
- ;**** ToolTypes
- (complete 95)
- ;**** WBStartup
- (complete 97)
- ;
- ; (IF (= WBStartup 1)
- ; (copyfiles (source (tackon ProgDir "AminetFind.info"))
- ; (dest "SYS:WBStartup")
- ; )
- ; )
- ;***** KEYFILE
- (complete 97)
-
- (if (<> (exists (tackon SourceDir "Keyfile/AFind.key") (noreq)) 0)
- (
- (copyfiles
- (source (tackon SourceDir "Keyfile/AFind.key"))
- (dest (tackon Progdir "Keyfile/"))
- (help @copyfiles-help)
-
- )
- )
- )
-
- ;***** Startup-Sequence
- (complete 98)
- (startup "AFind"
- (prompt "A path command has to be added to your user-startup")
- (help @startup-Help)
- (command (cat "path " ProgDir " add"))
- )
-
- ;***** Finished
- (complete 100)
- (exit #AFind-exit)
-